unit dbschema_AbstractModel;
Interface
Uses
  Classes,AdoDB,Forms,windows,db,sysutils,AbstractDAO;
Type
TAbstracttables=Class(TAbstractModel)
  Private
    Fid : integer;
    Fseq : integer;
    Fname : string;
    Fcomments : string;
    Fbrowsetype: string;
    FIdStr:string;
    FNameStr:string;
    FCodeStr:string;
  Protected
    procedure Setid(value:integer);
    procedure Setseq(value:integer);
    procedure Setname(value:string);
    procedure Setcomments(value:string);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property seq:integer read Fseq write Setseq;
    property name:string read Fname write Setname;
    property comments:string read Fcomments write Setcomments;
    property browsetype:string read Fbrowsetype write Fbrowsetype;
    property IdStr:string read FIdStr write FIdStr;
    property NameStr:string read FNameStr write FNameStr;
    property CodeStr:string read FCodeStr write FCodeStr;

end;
TAbstractcolumns=Class(TAbstractModel)
  Private
    Fid : integer;
    Fcorder : integer;
    Ftable_id : integer;
    Fname : string;
    Fdatatype : string;
    Fclength : integer;
    Fcprecision : integer;
    FUn : boolean;
    Fnn : boolean;
    FAi : boolean;
    FPk : boolean;
    Fcdefault : string;
    Fshowname : string;
    Fwidth : integer;
    Fedittype : string;
    Fvisible : boolean;
    Fcomments : string;
    FEditable: Boolean;
    FSourceTable:String;
    FSourceField:string;
  Protected
    procedure Setid(value:integer);
    procedure Setcorder(value:integer);
    procedure Settable_id(value:integer);
    procedure Setname(value:string);
    procedure Setdatatype(value:string);
    procedure Setclength(value:integer);
    procedure Setcprecision(value:integer);
    procedure Setun(value:boolean);
    procedure Setnn(value:boolean);
    procedure SetAi(value:boolean);
    procedure SetPk(value:boolean);
    procedure Setcdefault(value:string);
    procedure Setshowname(value:string);
    procedure Setwidth(value:integer);
    procedure Setedittype(value:string);
    procedure Setvisible(value:boolean);
    procedure Setcomments(value:string);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property corder:integer read Fcorder write Setcorder;
    property table_id:integer read Ftable_id write Settable_id;
    property name:string read Fname write Setname;
    property datatype:string read Fdatatype write Setdatatype;
    property clength:integer read Fclength write Setclength;
    property cprecision:integer read Fcprecision write Setcprecision;
    property un:boolean read Fun write Setun;
    property nn:boolean read Fnn write Setnn;
    property Ai:boolean read FAi write SetAi;
    property Pk:boolean read FPk write SetPk;
    property cdefault:string read Fcdefault write Setcdefault;
    property showname:string read Fshowname write Setshowname;
    property width:integer read Fwidth write Setwidth;
    property edittype:string read Fedittype write Setedittype;
    property visible:boolean read Fvisible write Setvisible;
    property comments:string read Fcomments write Setcomments;
    property Editable: Boolean  read FEditable write FEditable;
  property  SourceTable:String read FSourceTable write  FSourceTable;
  property  SourceField:string read FSourceField write FSourceField;

end;
TAbstractindexes=Class(TAbstractModel)
  Private
    Fid : integer;
    Ftable_id : integer;
    Fname : string;
    FIndextype : string;
    Fcolumn_id : integer;
    Fcolumn_seq : integer;
    Fcorder : integer;
    Fcomments : string;
  Protected
    procedure Setid(value:integer);
    procedure Settable_id(value:integer);
    procedure Setname(value:string);
    procedure SetIndextype(value:string);
    procedure Setcolumn_id(value:integer);
    procedure Setcolumn_seq(value:integer);
    procedure Setcorder(value:integer);
    procedure Setcomments(value:string);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property table_id:integer read Ftable_id write Settable_id;
    property name:string read Fname write Setname;
    property Indextype:string read FIndextype write SetIndextype;
    property column_id:integer read Fcolumn_id write Setcolumn_id;
    property column_seq:integer read Fcolumn_seq write Setcolumn_seq;
    property corder:integer read Fcorder write Setcorder;
    property comments:string read Fcomments write Setcomments;
end;
TAbstractfrKeys=Class(TAbstractModel)
  Private
    Fid : integer;
    Ftable_id : integer;
    Fname : string;
    Fcolumn_id : integer;
    Frefer_table_id : integer;
    Frefer_column_id : integer;
    Fcomments : string;
    Fsubtable : boolean;
  Protected
    procedure Setid(value:integer);
    procedure Settable_id(value:integer);
    procedure Setname(value:string);
    procedure Setcolumn_id(value:integer);
    procedure Setrefer_table_id(value:integer);
    procedure Setrefer_column_id(value:integer);
    procedure Setcomments(value:string);
    procedure Setsubtable(value:boolean);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property table_id:integer read Ftable_id write Settable_id;
    property name:string read Fname write Setname;
    property column_id:integer read Fcolumn_id write Setcolumn_id;
    property refer_table_id:integer read Frefer_table_id write Setrefer_table_id;
    property refer_column_id:integer read Frefer_column_id write Setrefer_column_id;
    property comments:string read Fcomments write Setcomments;
    property subtable:boolean read Fsubtable write Setsubtable;
end;
TAbstractsystypesx=Class(TAbstractModel)
  Private
    Fxtype : integer;
    Fname : string;
  Protected
    procedure Setxtype(value:integer);
    procedure Setname(value:string);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property xtype:integer read Fxtype write Setxtype;
    property name:string read Fname write Setname;
end;
TAbstractusertypes=Class(TAbstractModel)
  Private
    Fid : integer;
    Fname : string;
    Fxtype : integer;
    Ftdefault : integer;
    Fallownulls : boolean;
    Fprec : integer;
    Fscale : integer;
  Protected
    procedure Setid(value:integer);
    procedure Setname(value:string);
    procedure Setxtype(value:integer);
    procedure Settdefault(value:integer);
    procedure Setallownulls(value:boolean);
    procedure Setprec(value:integer);
    procedure Setscale(value:integer);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property name:string read Fname write Setname;
    property xtype:integer read Fxtype write Setxtype;
    property tdefault:integer read Ftdefault write Settdefault;
    property allownulls:boolean read Fallownulls write Setallownulls;
    property prec:integer read Fprec write Setprec;
    property scale:integer read Fscale write Setscale;
end;
TAbstractdefaults=Class(TAbstractModel)
  Private
    Fid : integer;
    Fname : string;
    Fdtext : Variant;
  Protected
    procedure Setid(value:integer);
    procedure Setname(value:string);
    procedure Setdtext(value:Variant);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property name:string read Fname write Setname;
    property dtext:Variant read Fdtext write Setdtext;
end;
TAbstracttrigers=Class(TAbstractModel)
  Private
    Fid : integer;
    Fname : string;
    Ftable_id : integer;
    Fdtext : Variant;
  Protected
    procedure Setid(value:integer);
    procedure Setname(value:string);
    procedure Settable_id(value:integer);
    procedure Setdtext(value:Variant);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property name:string read Fname write Setname;
    property table_id:integer read Ftable_id write Settable_id;
    property dtext:Variant read Fdtext write Setdtext;
end;
TAbstractviews=Class(TAbstractModel)
  Private
    Fid : integer;
    Fname : string;
    Fdtext : Variant;
  Protected
    procedure Setid(value:integer);
    procedure Setname(value:string);
    procedure Setdtext(value:Variant);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property name:string read Fname write Setname;
    property dtext:Variant read Fdtext write Setdtext;
end;
TAbstractprocedures=Class(TAbstractModel)
  Private
    Fid : integer;
    Fname : string;
    Fdtext : Variant;
  Protected
    procedure Setid(value:integer);
    procedure Setname(value:string);
    procedure Setdtext(value:Variant);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property name:string read Fname write Setname;
    property dtext:Variant read Fdtext write Setdtext;
end;
TAbstractFunctions=Class(TAbstractModel)
  Private
    Fid : integer;
    Fname : string;
    Fdtext : Variant;
  Protected
    procedure Setid(value:integer);
    procedure Setname(value:string);
    procedure Setdtext(value:Variant);
  Public
    procedure AssignTo(Dest: TPersistent); override;
    property id:integer read Fid write Setid;
    property name:string read Fname write Setname;
    property dtext:Variant read Fdtext write Setdtext;
end;

var
  Abstracttables:TAbstracttables;
  Abstractcolumns:TAbstractcolumns;
  Abstractindexes:TAbstractindexes;
  AbstractfrKeys:TAbstractfrKeys;
  Abstractsystypesx:TAbstractsystypesx;
  Abstractusertypes:TAbstractusertypes;
  Abstractdefaults:TAbstractdefaults;
  Abstracttrigers:TAbstracttrigers;
  Abstractviews:TAbstractviews;
  Abstractprocedures:TAbstractprocedures;
  AbstractFunctions:TAbstractFunctions;
 implementation
//-- Abstracttables
procedure TAbstracttables.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstracttables then  
    with TAbstracttables(Dest) do  
    begin                        
      id:=self.id;
      seq:=self.seq;
      name:=self.name;
      comments:=self.comments;
      browsetype:=self.browsetype;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstracttables.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstracttables.Setseq(value : integer);
begin
  Fseq:=value;
end;
Procedure TAbstracttables.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstracttables.Setcomments(value : string);
begin
  Fcomments:=value;
end;
//-- Abstractcolumns
procedure TAbstractcolumns.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractcolumns then  
    with TAbstractcolumns(Dest) do  
    begin                        
      id:=self.id;
      corder:=self.corder;
      table_id:=self.table_id;
      name:=self.name;
      datatype:=self.datatype;
      clength:=self.clength;
      cprecision:=self.cprecision;
      nn:=self.nn;
      Ai:=self.Ai;
      Pk:=self.Pk;
      cdefault:=self.cdefault;
      showname:=self.showname;
      width:=self.width;
      edittype:=self.edittype;
      visible:=self.visible;
      comments:=self.comments;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractcolumns.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractcolumns.Setcorder(value : integer);
begin
  Fcorder:=value;
end;
Procedure TAbstractcolumns.Settable_id(value : integer);
begin
  Ftable_id:=value;
end;
Procedure TAbstractcolumns.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractcolumns.Setdatatype(value : string);
begin
  Fdatatype:=value;
end;
Procedure TAbstractcolumns.Setclength(value : integer);
begin
  Fclength:=value;
end;
Procedure TAbstractcolumns.Setcprecision(value : integer);
begin
  Fcprecision:=value;
end;
Procedure TAbstractcolumns.Setun(value : boolean);
begin
  Fun:=value;
end;
Procedure TAbstractcolumns.Setnn(value : boolean);
begin
  Fnn:=value;
end;
Procedure TAbstractcolumns.SetAi(value : boolean);
begin
  FAi:=value;
end;
Procedure TAbstractcolumns.SetPk(value : boolean);
begin
  FPk:=value;
end;
Procedure TAbstractcolumns.Setcdefault(value : string);
begin
  Fcdefault:=value;
end;
Procedure TAbstractcolumns.Setshowname(value : string);
begin
  Fshowname:=value;
end;
Procedure TAbstractcolumns.Setwidth(value : integer);
begin
  Fwidth:=value;
end;
Procedure TAbstractcolumns.Setedittype(value : string);
begin
  Fedittype:=value;
end;
Procedure TAbstractcolumns.Setvisible(value : boolean);
begin
  Fvisible:=value;
end;
Procedure TAbstractcolumns.Setcomments(value : string);
begin
  Fcomments:=value;
end;
//-- Abstractindexes
procedure TAbstractindexes.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractindexes then  
    with TAbstractindexes(Dest) do  
    begin                        
      id:=self.id;
      table_id:=self.table_id;
      name:=self.name;
      Indextype:=self.Indextype;
      column_id:=self.column_id;
      column_seq:=self.column_seq;
      corder:=self.corder;
      comments:=self.comments;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractindexes.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractindexes.Settable_id(value : integer);
begin
  Ftable_id:=value;
end;
Procedure TAbstractindexes.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractindexes.SetIndextype(value : string);
begin
  FIndextype:=value;
end;
Procedure TAbstractindexes.Setcolumn_id(value : integer);
begin
  Fcolumn_id:=value;
end;
Procedure TAbstractindexes.Setcolumn_seq(value : integer);
begin
  Fcolumn_seq:=value;
end;
Procedure TAbstractindexes.Setcorder(value : integer);
begin
  Fcorder:=value;
end;
Procedure TAbstractindexes.Setcomments(value : string);
begin
  Fcomments:=value;
end;
//-- AbstractfrKeys
procedure TAbstractfrKeys.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractfrKeys then  
    with TAbstractfrKeys(Dest) do  
    begin                        
      id:=self.id;
      table_id:=self.table_id;
      name:=self.name;
      column_id:=self.column_id;
      refer_table_id:=self.refer_table_id;
      refer_column_id:=self.refer_column_id;
      comments:=self.comments;
      subtable:=self.subtable;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractfrKeys.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractfrKeys.Settable_id(value : integer);
begin
  Ftable_id:=value;
end;
Procedure TAbstractfrKeys.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractfrKeys.Setcolumn_id(value : integer);
begin
  Fcolumn_id:=value;
end;
Procedure TAbstractfrKeys.Setrefer_table_id(value : integer);
begin
  Frefer_table_id:=value;
end;
Procedure TAbstractfrKeys.Setrefer_column_id(value : integer);
begin
  Frefer_column_id:=value;
end;
Procedure TAbstractfrKeys.Setcomments(value : string);
begin
  Fcomments:=value;
end;
Procedure TAbstractfrKeys.Setsubtable(value : boolean);
begin
  Fsubtable:=value;
end;
//-- Abstractsystypesx
procedure TAbstractsystypesx.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractsystypesx then  
    with TAbstractsystypesx(Dest) do  
    begin                        
      xtype:=self.xtype;
      name:=self.name;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractsystypesx.Setxtype(value : integer);
begin
  Fxtype:=value;
end;
Procedure TAbstractsystypesx.Setname(value : string);
begin
  Fname:=value;
end;
//-- Abstractusertypes
procedure TAbstractusertypes.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractusertypes then  
    with TAbstractusertypes(Dest) do  
    begin                        
      id:=self.id;
      name:=self.name;
      xtype:=self.xtype;
      tdefault:=self.tdefault;
      allownulls:=self.allownulls;
      prec:=self.prec;
      scale:=self.scale;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractusertypes.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractusertypes.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractusertypes.Setxtype(value : integer);
begin
  Fxtype:=value;
end;
Procedure TAbstractusertypes.Settdefault(value : integer);
begin
  Ftdefault:=value;
end;
Procedure TAbstractusertypes.Setallownulls(value : boolean);
begin
  Fallownulls:=value;
end;
Procedure TAbstractusertypes.Setprec(value : integer);
begin
  Fprec:=value;
end;
Procedure TAbstractusertypes.Setscale(value : integer);
begin
  Fscale:=value;
end;
//-- Abstractdefaults
procedure TAbstractdefaults.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractdefaults then  
    with TAbstractdefaults(Dest) do  
    begin                        
      id:=self.id;
      name:=self.name;
      dtext:=self.dtext;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractdefaults.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractdefaults.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractdefaults.Setdtext(value : Variant);
begin
  Fdtext:=value;
end;
//-- Abstracttrigers
procedure TAbstracttrigers.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstracttrigers then  
    with TAbstracttrigers(Dest) do  
    begin                        
      id:=self.id;
      name:=self.name;
      table_id:=self.table_id;
      dtext:=self.dtext;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstracttrigers.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstracttrigers.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstracttrigers.Settable_id(value : integer);
begin
  Ftable_id:=value;
end;
Procedure TAbstracttrigers.Setdtext(value : Variant);
begin
  Fdtext:=value;
end;
//-- Abstractviews
procedure TAbstractviews.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractviews then  
    with TAbstractviews(Dest) do  
    begin                        
      id:=self.id;
      name:=self.name;
      dtext:=self.dtext;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractviews.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractviews.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractviews.Setdtext(value : Variant);
begin
  Fdtext:=value;
end;
//-- Abstractprocedures
procedure TAbstractprocedures.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractprocedures then  
    with TAbstractprocedures(Dest) do  
    begin                        
      id:=self.id;
      name:=self.name;
      dtext:=self.dtext;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractprocedures.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractprocedures.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractprocedures.Setdtext(value : Variant);
begin
  Fdtext:=value;
end;
//-- Abstractfunctions
procedure TAbstractfunctions.AssignTo(Dest: TPersistent);
begin
  if Dest is TAbstractfunctions then
    with TAbstractfunctions(Dest) do
    begin                        
      id:=self.id;
      name:=self.name;
      dtext:=self.dtext;
    end                          
  else inherited AssignTo(Dest); 
end;
Procedure TAbstractfunctions.Setid(value : integer);
begin
  Fid:=value;
end;
Procedure TAbstractfunctions.Setname(value : string);
begin
  Fname:=value;
end;
Procedure TAbstractfunctions.Setdtext(value : Variant);
begin
  Fdtext:=value;
end;

Initialization
  Abstracttables:=TAbstracttables.Create;
  Abstractcolumns:=TAbstractcolumns.Create;
  Abstractindexes:=TAbstractindexes.Create;
  AbstractfrKeys:=TAbstractfrKeys.Create;
  Abstractsystypesx:=TAbstractsystypesx.Create;
  Abstractusertypes:=TAbstractusertypes.Create;
  Abstractdefaults:=TAbstractdefaults.Create;
  Abstracttrigers:=TAbstracttrigers.Create;
  Abstractviews:=TAbstractviews.Create;
  Abstractprocedures:=TAbstractprocedures.Create;
  AbstractFunctions:=TAbstractFunctions.Create;

end.